const baseMixins = {
  data() {
    return {
      routerQueryParam: {}
    }
  },
  methods: {
    goBack() {
      this.$router.back(-1)
    },
    goSpecificPage({path, query}) {
      if (path == null || path == '') {
        return
      }
      this.$router.push({path, query})
    },
    getQueryParam() {
      return this.routerQueryParam != null ? _.cloneDeep(this.routerQueryParam) : {}
    }
  },
  created() {
    this.routerQueryParam = this.$route.query
  }
}

export {baseMixins}
